﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;

namespace Brain.Rendering
{
    /*public class SemanticEffect : Effect
    {
        public Dictionary<string, EffectParameter> Parameters;

        public EffectParameter GetParameter(string key)
        {
            if (Parameters == null)
            {
                Parameters = EffectUtil.GetSemantics(this);
            }
            return Parameters[key];
        }

        private EffectParameter _world;
        public Matrix World
        {
            get
            {
                if (_world == null)
                {
                    _world = GetParameter("world");
                }
                if (_world != null)
                {
                    return _world.GetValueMatrix();
                }
                throw new Exception("World Parameter not found");
            }
            set
            {
                if (_world == null)
                {
                    _world = GetParameter("world");
                }
                if (_world != null)
                {
                    _world.SetValue(value);
                    return;
                }
            }
        }

        private EffectParameter _view;
        public Matrix View
        {
            get
            {
                if (_view == null)
                {
                    _view = GetParameter("view");
                }
                if (_view != null)
                {
                    return _view.GetValueMatrix();
                }
                throw new Exception("View Parameter not found");
            }
            set
            {
                if (_view == null)
                {
                    _view = GetParameter("view");
                }
                if (_view != null)
                {
                    _view.SetValue(value);
                    return;
                }
            }
        }

        private EffectParameter _projection;
        public Matrix Projection
        {
            get
            {
                if (_projection == null)
                {
                    _projection = GetParameter("projection");
                }
                if (_projection != null)
                {
                    return _view.GetValueMatrix();
                }
                throw new Exception("View Parameter not found");
            }
            set
            {
                if (_projection == null)
                {
                    _projection = GetParameter("projection");
                }
                if (_projection != null)
                {
                    _projection.SetValue(value);
                    return;
                }
            }
        }
    }*/
}
